<{include "public/header.html"}>
<div class="right">
	<div class="huiyuan_main">
	<h3 class="hy_rtt c666">订单编号： <{$id}></h3>
		<div class="mat5 font13 zt">
		<p class="c666"><span class="font12"><{$atime|date_format:'%Y-%m-%d %H:%M'}>：</span><span class="cgreen">订单创建成功</span>，订单编号：<{$id}></p>
			<!--货到付款-->
			<{if $payway eq 3 }>
				<{if $state eq 1 }>
				<p class="cred mat5" style="padding-left:113px">等待卖家发货<a href="<{$url}>&a=state&state=3&id=<{$id}>" onclick="return bro_dialog(this, '填写快递信息')" class="shouhuo_btn mal10">发货</a></p>
				<{elseif $state eq 3 }>
				<p class="c666 mat5"><span class="font12"><{$stime|date_format:'%Y-%m-%d %H:%M'}>：</span><span class="cgreen">卖家已经发货</span>，快递单号：<{$wlid}>（<{if !empty($wlname) }><{$wlname}> <{else}>无需快递 <{/if}>）</p>
				<p class="cred mat5" style="padding-left:113px">等待买家付款<a href="<{$url}>&a=state&state=2&id=<{$id}>" onclick="return confirm('你确定付款操作吗？')" class="pay_btn mal10">付款</a></p>
				<{elseif $state eq 4 }>
				<p class="c666 mat5"><span class="font12"><{$stime|date_format:'%Y-%m-%d %H:%M'}>：</span><span class="cgreen">卖家已经发货</span>，快递单号：<{$wlid}>（<{if !empty($wlname) }><{$wlname}> <{else}>无需快递 <{/if}>）</p>
				<p class="c666 mat5"><span class="font12"><{$ptime|date_format:'%Y-%m-%d %H:%M'}>：</span><span class="cgreen">买家付款成功</span>，支付金额：<{$money}>元</p>
				<p class="c666 mat5"><span class="font12"><{$ptime|date_format:'%Y-%m-%d %H:%M'}>：</span><span class="cgreen strong">订单交易成功，欢迎下次光临！</span></p>
				<{/if}>
			<!--先款后货-->
			<{else}>
				<{if $state eq 1 }>
				<p class="cred mat5" style="padding-left:113px">等待买家付款<a href="<{$url}>&a=state&state=2&id=<{$id}>" onclick="return  confirm('你确定付款操作吗？')" class="pay_btn mal10">付款</a></p>
				<{elseif $state eq 2 }>
				<p class="c666 mat5"><span class="font12"><{$ptime|date_format:'%Y-%m-%d %H:%M'}>：</span><span class="cgreen">买家付款成功</span>，支付金额<{$money}>元</p>
				<p class="cred mat5" style="padding-left:113px">等待卖家发货<a href="<{$url}>&a=state&state=3&id=<{$id}>" onclick="return bro_dialog(this, '填写快递信息')" class="shouhuo_btn mal10">发货</a></p>
				<{elseif $state eq 3 }>
				<p class="c666 mat5"><span class="font12"><{$ptime|date_format:'%Y-%m-%d %H:%M'}>：</span><span class="cgreen">买家付款成功</span>，支付金额：<{$money}>元</p>
				<p class="c666 mat5"><span class="font12"><{$stime|date_format:'%Y-%m-%d %H:%M'}>：</span><span class="cgreen">卖家已经发货</span>，快递单号：<{$wlid}>（<{if !empty($wlname) }><{$wlname}> <{else}>无需快递 <{/if}>）</p>
				<p class="cred mat5" style="padding-left:113px">等待买家确认</p>
				<{elseif $state eq 4 }>
				<p class="c666 mat5"><span class="font12"><{$ptime|date_format:'%Y-%m-%d %H:%M'}>：</span><span class="cgreen">买家付款成功</span>，支付金额：<{$money}>元</p>
				<p class="c666 mat5"><span class="font12"><{$stime|date_format:'%Y-%m-%d %H:%M'}>：</span><span class="cgreen">卖家已经发货</span>，运单编号<{$wlid}>（<{if !empty($wlname) }><{$wlname}> <{else}>无需快递 <{/if}>）</p>
				<p class="c666 mat5"><span class="font12"><{$stime|date_format:'%Y-%m-%d %H:%M'}>：</span><span class="cgreen strong">订单交易成功，欢迎下次光临！</span></p>
				<{/if}>
			<{/if}>
		  <div class="clear"></div>
		</div>
		<form method="post">
		<div class="hy_table" style="margin-top:10px;">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="hy_tb_tt1">
			<tr>
				<td class="bg_f8 font12" width="">商品详情</td>
				<td class="bg_f8 font12" width="120">商品单价(元)</td>
				<td class="bg_f8 font12" width="120">购买数量</td>
			</tr>
			</table>
			<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-left:1px solid #ddd;">
  
			<{foreach $product_list as $v}>	
			<tr>
				<td style="text-align:left;">
					<div class="dingdan_list">
						<a href="<{$root}>/index.php?m=product&a=index&id=<{$v.pid}>" class="fl mar5"><img src="<{thumb($v.plogo, 60,60)}>" width="45" height="45"></a>
						<div class="fl font12">
							<a href="<{$root}>/index.php?m=product&a=index&id=<{$v.pid}>" title="<{$v.pname}>" target="_blank" class="cblue dd_name"><{$v.pname}></a>
						
						</div>
						<div class="clear"></div>
					</div>
				</td>
				<td width="110"><span class="num strong font14"><{$v.pmoney}></span></td>
				<td width="100"><span class="num font14"><{$v.pnum}></span></td>
			</tr>
			<{/foreach}>
			</table>
			<div class="ddxq_je font13">
				<{if $state neq 1}>
				应付总额：<span class="strong num1 font18 cred strong" id="order_money"><{$money}></span>(元) ＝ 
				<span class="font14 cred num strong"><{$productmoney}></span>(商品总额)
				＋ <span class="font14 cred num strong"><{$wlmoney}></span>(运费)
				<{else}>
				应付总额：<span class="strong num1 font18 cred strong" id="order_money"><{$money}></span>(元) ＝ 
				<input type="text" name="$productmoney" value="<{$productmoney}>" class="inputtext input80" />(商品总额)
				＋ <input type="text" name="wlmoney" value="<{$wlmoney}>" class="inputtext input60" />(运费)
				<{/if}>
			</div>
		</div>
		<div class="hy_table3">
			<h3>收货信息</h3>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td style="text-align:right" width="105">会员帐号：</td>
				<td style="text-align:left"><{if !empty($uid) }><{$uname}>（ID：<{$uid}>）<{else}><span class="c888">未登录用户</span><{/if}></td>
			</tr>
			<tr>
				<td style="text-align:right">付款方式：</td>
				<td style="text-align:left">
				
				

				 <{if $state eq 1}>  

                                <{foreach $cache_payway as $k => $v }>
				<{if $v.state eq 1}>
			      	  <option value="<{$k}>" <{if $k eq $payway }>selected="selected"<{/if}>><{$v.name}></option>     
		       	     
				<{/if}>
		       		 <{/foreach}>

				</select>
				<{else}>
			       		 <{$paywayarr[$payway]}>
				<{/if}>
				</td>
			</tr>
			<tr>
				<td style="text-align:right">收货姓名：</td>
				<td style="text-align:left">
				<{if $state eq 4 }>  
				<{$utname}>
				<{else}>
				<input type="text" name="uname" value="<{$utname}>" class="inputall input150">
				<{/if}>
				</td>
			</tr>
			<tr>
				<td style="text-align:right">联系电话：</td>
				<td style="text-align:left">
				<{if $state eq 4 }>  
				<{$uphone}>
				<{else}>
				<input type="text" name="uphone" value="<{$uphone}>" class="inputall input150" />
				<{/if}>
				</td>
			</tr>
			<tr>
				<td style="text-align:right">收货地址：</td>
				<td style="text-align:left" colspan="3">
				<{if $state eq 4 }>  
				<{$uaddress}>
				<{else}>
				<input type="text" name="uaddress" value="<{$uaddress}>" class="inputall input500" />
				<{/if}>
				</td>
			</tr>
			<tr>
				<td style="text-align:right">买家留言：</td>
				<td style="text-align:left" colspan="3">
				<{if $state eq 4 }>  
			       <{$content}>
				<{else}>
				<textarea name="content" style="width:500px;height:100px"><{$content}></textarea>
				<{/if}>
				</td>
			</tr>
			</table>
		</div>
		<{if $state neq 4 }>  
		<div class="mat10 center"><input type="submit" name="do_submit" value="提 交" class="tjbtn" /></div>
		<{/if}>
		</form>
	</div>
	<div class="clear"></div>
</div>
<script charset="utf-8" src="<{$public}>/js/plugin/artdialog/jquery.artDialog.js?skin=chrome"></script>
<script charset="utf-8" src="<{$public}>/js/plugin/artdialog/plugins/iframeTools.js"></script>
<script type="text/javascript">
$(function(){
	$(":input[name='productmoney']").add(":input[name='wlmoney']").keyup(function(){
		var order_productmoney = parseFloat($(":input[name='productmoney']").val());
		var order_wlmoney = parseFloat($(":input[name='wlmoney'").val());
		if (isNaN(order_productmoney)) {
			order_productmoney = 0;
		}
		if (isNaN(order_wlmoney)) {
			order_wlmoney = 0;
		}
		$("#order_money").html(order_productmoney + order_wlmoney);
	})
})
</script>
<{include "public/footer.html"}>

